ci: Turn off errors for deprecated-declarations
authorColin Walters <walters@verbum.org>
Wed, 26 Apr 2023 13:37:22 +0000 (09:37 -0400)
committerColin Walters <walters@verbum.org>
Wed, 26 Apr 2023 13:37:22 +0000 (09:37 -0400)
Having `-Werror` on in CI only by default has generally worked OK,
but I don't think it's worth trying to immediately scramble to port
when they deprecate APIs.

Motivated in this case by
```
 src/libostree/ostree-fetcher-curl.c: In function 'initiate_next_curl_request':
src/libostree/ostree-fetcher-curl.c:876:3: error: 'CURLOPT_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
  876 |   rc = curl_easy_setopt (req->easy, CURLOPT_PROTOCOLS, (long)(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
      |   ^~
```

ci/build-check.sh
ci/build.sh

index aed8ba7e8a289b37135d69558a338f68b61637f4..716052c1a61429d358a236955735528a0e51fb6d 100755 (executable)
@@ -25,7 +25,7 @@ if test -x /usr/bin/clang; then
     if grep -q -e 'static inline.*_GLIB_AUTOPTR_LIST_FUNC_NAME' /usr/include/glib-2.0/glib/gmacros.h; then
         echo 'Skipping clang check, see https://bugzilla.gnome.org/show_bug.cgi?id=796346'
     else
-    export CFLAGS="-Wall -Werror ${CFLAGS:-}"
+    export CFLAGS="-Wall -Werror -Wno-error=deprecated-declarations ${CFLAGS:-}"
     git clean -dfx && git submodule foreach git clean -dfx
     export CC=clang
     build
index 2afcd0188c8905a70eccf7be274644338c5b282d..4860565845c56b5d1a5d00655be6e0b87019c797 100755 (executable)
@@ -30,6 +30,6 @@ esac
 
 # always fail on warnings; https://github.com/ostreedev/ostree/pull/971
 # NB: this disables the default set of flags from configure.ac
-export CFLAGS="-Wall -Werror ${CFLAGS:-}"
+export CFLAGS="-Wall -Werror -Wno-error=deprecated-declarations ${CFLAGS:-}"
 
 build --enable-gtk-doc ${CONFIGOPTS:-}